class EfAddressFieldFormatter extends EfFieldFormatter

Provides formatting methods for addressfield field type.

Methods

__construct(EntityMetadataWrapper $property, bool $isMultivalue)

Constructor.

array|string
value()

Returns the current field item as a raw array.

array
values()

Returns all raw field items in an array.

all()

Returns an array of all field items as EfFieldFormatter objects.

array
setDelta($delta)

Set the current field delta.

bool
isDeltaValid(null $delta = NULL)

Checks if the given or current field delta exists.

bool
notEmpty()

Shortcut for the possible not so easy to understand isDeltaValid() method.

bool
isAccessible()

Check if current user is allowed to view this field.

getIterator()

Implementing IteratorAggregate interface.

int
count()

Implementing Countable interface.

$this
setHandlers($handlers)

Set formatting handlers for this addressfield.

string
address()

Returns an formatted address. By default the formatting handlers from the widget are used.

string
country()

Returns the country name of this address.

string
city()

Returns the city of this address.

string
postalCode()

Returns the postal code of this address.

string
street()

Returns the street of this address.

string
name()

Returns the name line of this address.

string
company()

Returns the company of this address.

__toString()

No description

Details

at line 938
__construct(EntityMetadataWrapper $property, bool $isMultivalue)

Constructor.

Parameters

EntityMetadataWrapper $property The value of this field wrapped by an EntityMetadataWrapper.
bool $isMultivalue Whether this field has a cardinality greater than one.

in EfFieldFormatter at line 43
array|string value()

Returns the current field item as a raw array.

Return Value

array|string

in EfFieldFormatter at line 52
array values()

Returns all raw field items in an array.

Return Value

array

in EfFieldFormatter at line 61
EfFieldFormatter[] all()

Returns an array of all field items as EfFieldFormatter objects.

Return Value

EfFieldFormatter[]

in EfFieldFormatter at line 74
array setDelta($delta)

Set the current field delta.

Parameters

$delta

Return Value

array

in EfFieldFormatter at line 91
bool isDeltaValid(null $delta = NULL)

Checks if the given or current field delta exists.

Parameters

null $delta

Return Value

bool

in EfFieldFormatter at line 102
bool notEmpty()

Shortcut for the possible not so easy to understand isDeltaValid() method.

Return Value

bool

in EfFieldFormatter at line 113
bool isAccessible()

Check if current user is allowed to view this field.

Can be needed if a module like field_permissions is in use.

Return Value

bool True, if current user is allowed to view this field.

in EfFieldFormatter at line 124
EfFieldFormatterIterator getIterator()

Implementing IteratorAggregate interface.

If we wrap a list, we return an iterator over the data list.

in EfFieldFormatter at line 133
int count()

Implementing Countable interface.

Return Value

int The number of items of this field.

at line 952
$this setHandlers($handlers)

Set formatting handlers for this addressfield.

Parameters

$handlers

Return Value

$this

at line 965
string address()

Returns an formatted address. By default the formatting handlers from the widget are used.

Return Value

string

at line 989
string country()

Returns the country name of this address.

Return Value

string

at line 1004
string city()

Returns the city of this address.

Return Value

string

at line 1018
string postalCode()

Returns the postal code of this address.

Return Value

string

at line 1032
string street()

Returns the street of this address.

Return Value

string

at line 1046
string name()

Returns the name line of this address.

Return Value

string

at line 1060
string company()

Returns the company of this address.

Return Value

string

at line 1069
__toString()